package com.aspose.cells;

public class ToggleButtonActiveXControl extends ActiveXControl {
   private static final com.aspose.cells.b.c.a.za f = new com.aspose.cells.b.c.a.za(new String[]{"1", "0"});

   ToggleButtonActiveXControl(Shape shape) {
      super(shape);
      this.e = new zanp();
      this.b().b = -2147483640;
   }

   private zanp b() {
      return (zanp)this.e;
   }

   public int getType() {
      return 9;
   }

   int a(int var1) {
      return zanp.b(var1);
   }

   public String getCaption() {
      return this.e.n;
   }

   public void setCaption(String value) {
      this.e.n = value;
      this.b(16);
   }

   public int getPicturePosition() {
      return this.e.l;
   }

   public void setPicturePosition(int value) {
      this.e.l = value;
      this.b(12);
   }

   public int getSpecialEffect() {
      return this.e.f & 255;
   }

   public void setSpecialEffect(int value) {
      this.e.f = (byte)value;
      this.b(7);
   }

   public byte[] getPicture() {
      return this.e.j;
   }

   public void setPicture(byte[] value) {
      this.e.j = value;
      this.b(9);
   }

   public char getAccelerator() {
      return this.e.m;
   }

   public void setAccelerator(char value) {
      this.e.m = value;
      this.b(0);
   }

   public int getValue() {
      if (this.b().G == null) {
         return 0;
      } else {
         switch(f.a(this.b().G)) {
         case 0:
            return 1;
         case 1:
            return 0;
         default:
            return 2;
         }
      }
   }

   public void setValue(int value) {
      switch(value) {
      case 0:
         this.b().G = "0";
         break;
      case 1:
         this.b().G = "1";
         break;
      default:
         this.b().G = "2";
      }

      this.b(40);
   }

   public boolean isTripleState() {
      return this.c(39) && this.b().F == 1;
   }

   public void setTripleState(boolean value) {
      this.b().F = (byte)(value ? 1 : 0);
      this.a(39, value);
   }
}
